package com.gzyj.data.common;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@ApiModel("响应参数")
@Data
public class ResponseMsg<T> implements Serializable {
    @ApiModelProperty("响应码")
    private Integer code;

    @ApiModelProperty("响应消息")
    private String msg;

    @ApiModelProperty("是否成功")
    private Boolean success;

    @ApiModelProperty("扩展1")
    private Integer sitecount;

    @ApiModelProperty("扩展2")
    private Integer locatesitecount;

    @ApiModelProperty("扩展3")
    private Double Mile;

    @ApiModelProperty("响应消息")
    private T result;

    @ApiModelProperty("响应消息")
    private T data;

    public ResponseMsg(Integer code, Boolean success, Integer sitecount, Integer locatesitecount, Double mile, T data) {
        this.code = code;

        this.success = success;
        this.sitecount = sitecount;
        this.locatesitecount = locatesitecount;
        Mile = mile;
        this.data = data;
    }

    public ResponseMsg(Integer code, String msg, T result) {
        this.code = code;
        this.msg = msg;
        this.data = result;
    }

    public ResponseMsg(Integer code, Boolean success, T data) {
        this.code = code;
        this.success = success;
        this.data = data;
    }

    public ResponseMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}

